package com.css.fxfzysx.modules.vabStructure.constans;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.math.BigDecimal;

@Getter
@AllArgsConstructor
public enum FimEnum {

    INTENSITY6("6度",new BigDecimal("0.05")),
    INTENSITY7("7度",new BigDecimal("0.1")),
    INTENSITY8("8度",new BigDecimal("0.2")),
    INTENSITY9("9度",new BigDecimal("0.4")),
    INTENSITY10("10度",new BigDecimal("0.8"));

    private final String code;
    private final BigDecimal value;

    public static BigDecimal getByCode(String code) {
        for (FimEnum value : FimEnum.values()) {
            if (value.getCode().equals(code)) {
                return value.getValue();
            }
        }
        return null;
    }


}
